package com.jcl.recruit.apply.mapper;


import com.jcl.recruit.apply.model.InterviewSkd;

import static org.apache.ibatis.jdbc.SqlBuilder.*;

public class InterviewSkdSqlProvider {

    public String insertSelective(InterviewSkd record) {
        BEGIN();
        INSERT_INTO("interview_skd");
        
        if (record.getInterviewId() != null) {
            VALUES("interview_id", "#{interviewId,jdbcType=INTEGER}");
        }
        
        if (record.getResult() != null) {
            VALUES("result", "#{result,jdbcType=VARCHAR}");
        }
        
        if (record.getHrId() != null) {
            VALUES("hr_id", "#{hrId,jdbcType=INTEGER}");
        }
        
        if (record.getHr() != null) {
            VALUES("hr", "#{hr,jdbcType=VARCHAR}");
        }
        
        if (record.getDepartmentId() != null) {
            VALUES("department_id", "#{departmentId,jdbcType=INTEGER}");
        }
        
        if (record.getDepartment() != null) {
            VALUES("department", "#{department,jdbcType=VARCHAR}");
        }
        
        if (record.getManagerId() != null) {
            VALUES("manager_id", "#{managerId,jdbcType=INTEGER}");
        }
        
        if (record.getManager() != null) {
            VALUES("manager", "#{manager,jdbcType=VARCHAR}");
        }
        
        if (record.getScheduleDate() != null) {
            VALUES("schedule_date", "#{scheduleDate,jdbcType=DATE}");
        }
        
        if (record.getScheduleTime() != null) {
            VALUES("schedule_time", "#{scheduleTime,jdbcType=VARCHAR}");
        }
        
        if (record.getSchedulePlace() != null) {
            VALUES("schedule_place", "#{schedulePlace,jdbcType=VARCHAR}");
        }
        
        if (record.getCreatetime() != null) {
            VALUES("createtime", "#{createtime,jdbcType=TIMESTAMP}");
        }
        
        if (record.getStatus() != null) {
            VALUES("status", "#{status,jdbcType=INTEGER}");
        }
        
        return SQL();
    }

    public String updateByPrimaryKeySelective(InterviewSkd record) {
        BEGIN();
        UPDATE("interview_skd");
        
        if (record.getInterviewId() != null) {
            SET("interview_id = #{interviewId,jdbcType=INTEGER}");
        }
        
        if (record.getResult() != null) {
            SET("result = #{result,jdbcType=VARCHAR}");
        }
        
        if (record.getHrId() != null) {
            SET("hr_id = #{hrId,jdbcType=INTEGER}");
        }
        
        if (record.getHr() != null) {
            SET("hr = #{hr,jdbcType=VARCHAR}");
        }
        
        if (record.getDepartmentId() != null) {
            SET("department_id = #{departmentId,jdbcType=INTEGER}");
        }
        
        if (record.getDepartment() != null) {
            SET("department = #{department,jdbcType=VARCHAR}");
        }
        
        if (record.getManagerId() != null) {
            SET("manager_id = #{managerId,jdbcType=INTEGER}");
        }
        
        if (record.getManager() != null) {
            SET("manager = #{manager,jdbcType=VARCHAR}");
        }
        
        if (record.getScheduleDate() != null) {
            SET("schedule_date = #{scheduleDate,jdbcType=DATE}");
        }
        
        if (record.getScheduleTime() != null) {
            SET("schedule_time = #{scheduleTime,jdbcType=VARCHAR}");
        }
        
        if (record.getSchedulePlace() != null) {
            SET("schedule_place = #{schedulePlace,jdbcType=VARCHAR}");
        }
        
        if (record.getCreatetime() != null) {
            SET("createtime = #{createtime,jdbcType=TIMESTAMP}");
        }
        
        if (record.getStatus() != null) {
            SET("status = #{status,jdbcType=INTEGER}");
        }
        
        WHERE("id = #{id,jdbcType=INTEGER}");
        
        return SQL();
    }
}